/*
 * @Author Baorong Yu
 * @Email: y15195965752@163.com
 * @Address: 浙江省杭州市余杭区赛银国际12幢4楼
 * @Date 2023/7/24 11:12
 * @Description moj_app
 */

import 'package:flutter/cupertino.dart';
import 'package:flutter_uikit/flutter_uikit.dart';

///空状态
class UIEmpty extends StatelessWidget {
  final String imgStr;
  final double? imgWidth;
  final double? imgHeight;
  final EdgeInsetsGeometry? imgMargin;
  final String text;

  UIEmpty({
    Key? key,
    required this.imgStr,
    this.imgWidth,
    this.imgHeight,
    required this.text,
    this.imgMargin = const EdgeInsets.only(bottom: 24),
  });

  @override
  Widget build(BuildContext context) {
    return LayoutBuilder(
        builder: (BuildContext context, BoxConstraints constraints) {
      return Container(
        margin: const EdgeInsets.symmetric(vertical: 50),
        child: Column(
          children: [
            UIImage(
                imgStr: imgStr,
                width: imgWidth,
                height: imgHeight,
                margin: imgMargin),
            UIText(
              data: text,
              color: 0x99FFFFFF,
              fontSize: 14,
            )
          ],
        ),
      );
    });
  }
}
